<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>코오롱</title>
<link rel="stylesheet" type="text/css" href="${requestScope.contextPath}/css/import.css" />
<script type="text/javascript" src="${requestScope.contextPath}/js/jquery-ui-1.8.14.custom/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="${requestScope.contextPath}/js/common.js"></script>
<c:set var="userAgent" value="${header['User-Agent']}" />
<fmt:setBundle basename="com.kolon.config.properties.config" var="config" />
<c:if test="${fn:indexOf(userAgent, 'Android') != -1}"><c:set var="platForm" value="Android" /></c:if>
<c:if test="${fn:indexOf(userAgent, 'iPhone') != -1}"><c:set var="platForm" value="iPhone" /></c:if>

<c:choose>
<c:when test="${platForm eq 'iPhone'}">	

<script type="text/javascript">function appBack() {
	<%--document.location.href='<%=request.getHeader("Referer")%>';--%>
	history.back(-1);}</script>
<script type="text/javascript" src="${requestScope.contextPath}/js/cubiq-iscroll/iscroll.js"></script>
<script>
var myScroll;
function loaded() {
	myScroll = new iScroll('wrapper', { 
		checkDOMChanges: true,
		<c:choose><c:when test="${platForm eq 'Android'}">zoom: false</c:when><c:otherwise>zoom: true</c:otherwise></c:choose>
	});
}
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
window.addEventListener('DOMContentLoaded', setTimeout(function () { loaded(); }, 200), false);

$(document).ready(function(){ 
	$('#concise_view').find('img').each(function() {
		w = $(this).attr('width');
		h = $(this).attr('height');
		if (w > 300 || w == undefined) {
			imgUrl = "location.href='${requestScope.contextPath}/imgZoom.jsp?imgUrl=" + $(this).attr('src')+"&width="+$(this).attr('width')+"&height="+$(this).attr('height')+"'";
			$(this).attr('width', '300');
			$(this).attr('height', Math.round(h*(320/w)));
			$(this).attr('onClick', imgUrl);
			
		}
	});
});
</script>

<style type="text/css" media="all">
	<c:if test="${tbChk eq 'N'}">
	#wrapper { position:absolute; z-index:1; top:48px; bottom:0px; left:0; width:320px; overflow:auto; }
	#scroller { position:absolute; z-index:1; 
	-webkit-tap-highlight-color:rgba(0,0,0,0); 
		width:100%; padding:0; background:#fff; }
	</c:if>
	<c:if test="${tbChk eq 'Y'}">
	#wrapper { position:absolute; z-index:1; top:48px; bottom:0px; left:0; width:100%; overflow:auto; }
	#scroller { position:absolute; z-index:1; -webkit-tap-highlight-color:rgba(0,0,0,0); 
		width:320px; padding:0; background:#fff; }
	</c:if>
</style>

</head>
<body>
	<div id="wrap">
		<div class="header">
			<h1>콘사이스</h1>
		</div><!-- // header -->
		<div id="wrapper" class="content">
		<div id="scroller">
			<div class="news">
				<ul id="concise">
					<li><span class="bold">${map.Title }</span> <span class="date1" />${map.Importance } | ${map.CreateDate }</span></li>
				</ul>
				<div id="concise_view">
					<c:out value="${map.Contents }" escapeXml="false" />
				</div>
				<div class="btn_area">
					<p class="left_area">
						<a href="${requestScope.contextPath}/business/mConcise/mConciseList.do?more=${param.more}&type=${type}&page=${page}&SearchTitle=${SearchTitle}&SearchFirst=${SearchFirst}&SearchStartDate=${SearchStartDate}&SearchEndDate=${SearchEndDate}&endY=${param.endY}">
							<img src="${requestScope.contextPath}/images/btn/btn_list.gif" alt="목록" />
						</a>
					</p>
				</div>
			</div>
		</div>
		</div><!-- // content -->
	</div><!-- // wrap -->
</body>
</html>

</c:when>
<c:otherwise>

<script type="text/javascript">function appBack() {
	<%--document.location.href='<%=request.getHeader("Referer")%>';--%>
	history.back(-1);}</script>
<script>

$(document).ready(function(){ 
	$('#concise_view').find('img').each(function() {
		w = $(this).attr('width');
		h = $(this).attr('height');
		if (w > 300 || w == undefined) {
			imgUrl = "location.href='${requestScope.contextPath}/imgZoom.jsp?imgUrl=" + $(this).attr('src')+"&width="+$(this).attr('width')+"&height="+$(this).attr('height')+"'";
			$(this).attr('width', '300');
			$(this).attr('height', Math.round(h*(320/w)));
			$(this).attr('onClick', imgUrl);
		}
	});
});
</script>
<style type="text/css" media="all">
	<c:if test="${tbChk eq 'Y'}">
	.content{width:600px;}
	</c:if>
</style>
</head>
<body>
	<div id="wrap">
		<div class="header">
			<h1>콘사이스</h1>
		</div><!-- // header -->
		<div class="content">
			<div class="news">
				<ul id="concise">
					<li><span class="bold">${map.Title }</span> <span class="date1" />${map.Importance } | ${map.CreateDate }</span></li>
				</ul>
				<div id="concise_view">
					<c:out value="${map.Contents }" escapeXml="false" />
				</div>
				<div class="btn_area">
					<p class="left_area">
						<a href="${requestScope.contextPath}/business/mConcise/mConciseList.do?more=${param.more}&type=${type}&page=${page}&SearchTitle=${SearchTitle}&SearchFirst=${SearchFirst}&SearchStartDate=${SearchStartDate}&SearchEndDate=${SearchEndDate}&endY=${param.endY}">
							<img src="${requestScope.contextPath}/images/btn/btn_list.gif" alt="목록" />
						</a>
					</p>
				</div>
			</div>
		</div><!-- // content -->
	</div><!-- // wrap -->
</body>
</html>

</c:otherwise>
</c:choose>